<!DOCTYPE html>
<html>
<head>
    {include file='public/meta'/}
    <link rel="stylesheet" type="text/css" href="__STATIC_URL__/static/css/bootstrap-datetimepicker.css"/>
    <script src="__STATIC_URL__/static/js/bootstrap-datetimepicker.js" type="text/javascript" charset="utf-8"></script>

</head>
<body>
{include file='public/header'/}
<!------------------导航-------------------------->
<section>
    {include file='public/left'/}
    <!--------------------------主要内容区域------------------------------------->
    <div class="content">

        <div class="panel mgl15 mgr15">
            <div class="panel-body">
                <!--路径导航-->
                <ol class="breadcrumb">
                    <li>
                        <a href="javascript:;">门店管理</a>
                    </li>
                    <li class="active" id="fid" data-id="{$info['mid']}">小票设置</li>
                </ol>
                <div>
                    <div id="print">
                        <div class="panel panel-default ng-scope" >
                            <div class="panel-heading">
                                小票设置
                                <a class="btn btn-info pull-right" href="{:url('printset/edittpl')}" style="  margin-top: -7px;">修改</a>
                            </div>
                            <div class="panel-body">
                                <div class="col-sm-12">
                                    <div class="form-horizontal" data-layout="horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">标题</label>
                                            <div class="col-sm-6">
                                                <input type="text" class="form-control"
                                                       placeholder="" name="title" required="required" id="title">
                                                <div class="r-message text-danger"></div>
                                                <div class="r-desc ">

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-12">
                                    <div class="form-horizontal" data-layout="horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">坐标</label>
                                            <div class="col-sm-1">
                                                <input type="text" class="form-control" autocomplete="off"
                                                       placeholder="" name="lcost" required="required">



                                            </div>
                                            <div class="col-sm-1" style="width: 20px;line-height: 34px;">X

                                            </div>
                                            <div class="col-sm-1">
                                                <input type="text" class="form-control" autocomplete="off"
                                                       placeholder="" name="lcost" required="required">



                                            </div>
                                            <div class="col-sm-1" style="width: 20px;line-height: 34px;">Y

                                            </div>
                                            <div class="r-message text-danger"></div>
                                            <div class="r-desc ">
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-12">
                                    <div class="form-horizontal" data-layout="horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">小票数据</label>
                                            <div class="col-sm-6">
                                                  <textarea class="form-control" style="resize: none;" rows="4"
                                                            name="mchid_list" autocomplete="off" placeholder=""
                                                            required="required"></textarea>
                                                <div class="r-message text-danger"></div>
                                                <div class="r-desc ">

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-12">
                                    <div class="form-horizontal" data-layout="horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">小票尺寸</label>
                                            <div class="col-sm-6">
                                                <input type="text" class="form-control" autocomplete="off"
                                                       placeholder="" name="lcost" required="required">
                                                <div class="r-message text-danger"></div>
                                                <div class="r-desc ">

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>




                    </div>
                </div>
            </div>
        </div>
        {include file='public/footer'/}
    </div>
</section>
<script>
    $(function(){
        var mid= $("#fid").attr("data-id");

        $.ajax({
            url:"{:url('printset/index')}",
            type:"post",
            data:{
                mid:mid
            },
            success:function(data) {
                console.log(data)
                var text=data.data;
                var tr="";
                // console.log(text);
                for (var i = 0; i < text.length; i++) {
                    var id=text[i].id;
                    var url2="/member.php/printset/edittpl/id/"+id+".html";
                    var url="/member.php/printset/edittpl.html";
                    tr  +='   <div class="panel panel-default ng-scope" >\n' +
                        '                            <div class="panel-heading">\n' +
                        '                                '+text[i].title +'\n' +
                        '                                <a class="btn btn-info pull-right" href="'+url+' " style=" margin-top: -7px;">修改</a>\n' +
                        '                            </div>\n' +
                        '                            <div class="panel-body">\n' +
                        '                                <div class="col-sm-12">\n' +
                        '                                    <div class="form-horizontal" data-layout="horizontal">\n' +
                        '                                        <div class="form-group">\n' +
                        '                                            <label class="col-sm-2 control-label">标题</label>\n' +
                        '                                            <div class="col-sm-3">\n' +
                        '                                                <input type="text" class="form-control"\n' +
                        '                                                       placeholder="" name="title" required="required" readonly id="title" value=" '+text[i].title +'">\n' +
                        '                                                <div class="r-message text-danger"></div>\n' +
                        '                                                <div class="r-desc ">\n' +
                        '\n' +
                        '                                                </div>\n' +
                        '                                            </div>\n' +
                        '                                        </div>\n' +
                        '                                    </div>\n' +
                        '                                </div>\n' +
                        '                                <div class="col-sm-12">\n' +
                        '                                    <div class="form-horizontal" data-layout="horizontal">\n' +
                        '                                        <div class="form-group">\n' +
                        '                                            <label class="col-sm-2 control-label">坐标</label>\n' +
                        '                                            <div class="col-sm-1">\n' +
                        '                                                <input type="text" class="form-control" readonly  autocomplete="off"\n' +
                        '                                                       placeholder="" name="lcost" required="required" value="'+text[i].x +'">\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '                                                </div>\n' +
                        '                                            <div class="col-sm-1" style="width: 20px;line-height: 34px;">X\n' +
                        '\n' +
                        '                                            </div>\n' +
                        '                                            <div class="col-sm-1">\n' +
                        '                                                <input type="text" class="form-control" readonly  autocomplete="off"\n' +
                        '                                                       placeholder="" name="lcost" required="required" value="'+text[i].y +'">\n' +
                        '\n' +
                        '\n' +
                        '\n' +
                        '                                            </div>\n' +
                        '                                            <div class="col-sm-1" style="width: 20px;line-height: 34px;">Y\n' +
                        '\n' +
                        '                                            </div>\n' +
                        '                                            <div class="r-message text-danger"></div>\n' +
                        '                                            <div class="r-desc ">\n' +
                        '                                            </div>\n' +
                        '                                        </div>\n' +
                        '                                    </div>\n' +
                        '                                </div>\n' +
                        '                                <div class="col-sm-12">\n' +
                        '                                    <div class="form-horizontal" data-layout="horizontal">\n' +
                        '                                        <div class="form-group">\n' +
                        '                                            <label class="col-sm-2 control-label">小票数据</label>\n' +
                        '                                            <div class="col-sm-3">\n' +
                        '                                                  <textarea class="form-control" style="resize: none;" readonly  rows="8"\n' +
                        '                                                            name="mchid_list" autocomplete="off" placeholder=""\n' +
                        '                                                            required="required">'+text[i].info +'</textarea>\n' +
                        '                                                <div class="r-message text-danger"></div>\n' +
                        '                                                <div class="r-desc ">\n' +
                        '\n' +
                        '                                                </div>\n' +
                        '                                            </div>\n' +
                        '                                        </div>\n' +
                        '                                    </div>\n' +
                        '                                </div>\n' +
                        '                                <div class="col-sm-12">\n' +
                        '                                    <div class="form-horizontal" data-layout="horizontal">\n' +
                        '                                        <div class="form-group">\n' +
                        '                                            <label class="col-sm-2 control-label">小票尺寸</label>\n' +
                        '                                            <div class="col-sm-1">\n' +
                        '                                                <input type="text" class="form-control" readonly  autocomplete="off"\n' +
                        '                                                       placeholder="" name="lcost" required="required" value="'+text[i].bmpsize1 +'">\n' +

                        '                                                </div>\n' +
                        '                                            <div class="col-sm-1">\n' +
                        '                                                <input type="text" class="form-control" readonly  autocomplete="off"\n' +
                        '                                                       placeholder="" name="lcost" required="required" value="'+text[i].bmpsize2 +'">\n' +

                        '                                                </div>\n' +
                        '                                                <div class="r-desc ">\n' +
                        '\n' +
                        '                                                </div>\n' +
                        '                                            </div>\n' +
                        '                                        </div>\n' +
                        '                                    </div>\n' +
                        '                                </div>\n' +
                        '                            </div>\n' +
                        '                        </div>\n';
                }

                $('#print').html(tr);

            }
        })
    })

</script>
</body>

</html>
